<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>pg_pltemplate</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 9.1.2 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="System Catalogs"
HREF="catalogs.html"><LINK
REL="PREVIOUS"
TITLE="pg_opfamily"
HREF="catalog-pg-opfamily.html"><LINK
REL="NEXT"
TITLE="pg_proc"
HREF="catalog-pg-proc.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2011-12-01T22:07:59"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
><A
HREF="index.html"
>PostgreSQL 9.1.2 Documentation</A
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
TITLE="pg_opfamily"
HREF="catalog-pg-opfamily.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="catalogs.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 45. System Catalogs</TD
><TD
WIDTH="20%"
ALIGN="right"
VALIGN="top"
><A
TITLE="pg_proc"
HREF="catalog-pg-proc.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="CATALOG-PG-PLTEMPLATE"
>45.34. <TT
CLASS="STRUCTNAME"
>pg_pltemplate</TT
></A
></H1
><P
>   The catalog <TT
CLASS="STRUCTNAME"
>pg_pltemplate</TT
> stores
   <SPAN
CLASS="QUOTE"
>"template"</SPAN
> information for procedural languages.
   A template for a language allows the language to be created in a
   particular database by a simple <TT
CLASS="COMMAND"
>CREATE LANGUAGE</TT
> command,
   with no need to specify implementation details.
  </P
><P
>   Unlike most system catalogs, <TT
CLASS="STRUCTNAME"
>pg_pltemplate</TT
>
   is shared across all databases of a cluster: there is only one
   copy of <TT
CLASS="STRUCTNAME"
>pg_pltemplate</TT
> per cluster, not
   one per database.  This allows the information to be accessible in
   each database as it is needed.
  </P
><DIV
CLASS="TABLE"
><A
NAME="AEN87691"
></A
><P
><B
>Table 45-34. <TT
CLASS="STRUCTNAME"
>pg_pltemplate</TT
> Columns</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><THEAD
><TR
><TH
>Name</TH
><TH
>Type</TH
><TH
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>tmplname</TT
></TD
><TD
><TT
CLASS="TYPE"
>name</TT
></TD
><TD
>Name of the language this template is for</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>tmpltrusted</TT
></TD
><TD
><TT
CLASS="TYPE"
>boolean</TT
></TD
><TD
>True if language is considered trusted</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>tmpldbacreate</TT
></TD
><TD
><TT
CLASS="TYPE"
>boolean</TT
></TD
><TD
>True if language may be created by a database owner</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>tmplhandler</TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>Name of call handler function</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>tmplinline</TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>Name of anonymous-block handler function, or null if none</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>tmplvalidator</TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>Name of validator function, or null if none</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>tmpllibrary</TT
></TD
><TD
><TT
CLASS="TYPE"
>text</TT
></TD
><TD
>Path of shared library that implements language</TD
></TR
><TR
><TD
><TT
CLASS="STRUCTFIELD"
>tmplacl</TT
></TD
><TD
><TT
CLASS="TYPE"
>aclitem[]</TT
></TD
><TD
>Access privileges for template (not actually used)</TD
></TR
></TBODY
></TABLE
></DIV
><P
>   There are not currently any commands that manipulate procedural language
   templates; to change the built-in information, a superuser must modify
   the table using ordinary <TT
CLASS="COMMAND"
>INSERT</TT
>, <TT
CLASS="COMMAND"
>DELETE</TT
>,
   or <TT
CLASS="COMMAND"
>UPDATE</TT
> commands.
  </P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>    It is likely that <TT
CLASS="STRUCTNAME"
>pg_pltemplate</TT
> will be removed in some
    future release of <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>, in favor of
    keeping this knowledge about procedural languages in their respective
    extension installation scripts.
   </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="catalog-pg-opfamily.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="catalog-pg-proc.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><TT
CLASS="STRUCTNAME"
>pg_opfamily</TT
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="catalogs.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><TT
CLASS="STRUCTNAME"
>pg_proc</TT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>